<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>有设计稿rem</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maixmum-scale=1.0,user-scalable=no">
    <style>
        *{
            margin:0;
            padding:0;
        }
        html,body{
            width:100%;
            height:100%;
        }
    </style>
</head>
<body>
<div style="position:absolute;left:.94rem;top:1.63rem;width:1rem;height:1rem;background:#f00;"></div>
<div style="position:absolute;right:.94rem;top:1.63rem;width:1rem;height:1rem;background:#f00;"></div>
<div style="position:absolute;left:2.7rem;top:3.38rem;width:1rem;height:1rem;background:#00f;">
    <img src="./image/star-on.png" style=" width:.16rem;height:.16rem;">
    <img src="./image/star-on.png">
</div>
<script>
    window.onresize = getRem;
    function getRem(){
        document.documentElement.style.fontSize = document.documentElement.offsetWidth / 3.6+'px';
    }
    getRem();
</script>
</body>
</html>